package cn.rongdao.jrkabao.model.loan;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.bean.loan.CreditCardLoansDateBean;
import cn.rongdao.jrkabao.model.api.BaseSuDaiModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by mc on 17/9/23
 */

public class CreditCardLoansModel extends BaseSuDaiModel {

    public static CreditCardLoansModel getInstance() {
        return getPresent(CreditCardLoansModel.class);
    }

    public void execute(String source,String product_id,String indexSource,Observer<CreditCardLoansDateBean> observer) {
        addParamStrings("source", FRString.valueOf(source));
        addParamStrings("product_id",FRString.valueOf(product_id));
        addParamStrings("index_source", FRString.valueOf(indexSource));
        Observable<CreditCardLoansDateBean> observable = mServletApi.getLoanAmountAndPeriodNew(mParams).map(new HttpFunction<CreditCardLoansDateBean>());
        toSubscribe(observable, observer);
    }
}
